Automatic classification of sleep stages using EEG signals and convolutional neural networks

Sleep stages classification is one of the new topics in studying human life quality because it plays a crucial role in getting a healthy lifestyle. Abnormal changes or absence of normal sleep may lead to different diseases such as heart-related diseases, diabetes, and obesity. In general, sleep staging analysis can be performed using electroencephalography (EEG) signals. This study proposes a convolutional neural network (CNN) based methodology for sleep stage classification using EEG signals taken by six channels and transformed into time-frequency analysis images. The proposed methodology consists of three major steps: (i) segment the EEG signal into epochs with 30 seconds in length, (ii) convert epochs into 2D representation using time-frequency analysis, and (iii) feed the 2D time-frequency analysis to the 2D CNN. The results showed that the proposed methodology is robust and achieved a very high accuracy of 99.39% for channel C4-A1. All other channels have accuracy values above 98.5%, which indicates that any channel can be used for sleep stage classification with high accuracy. The proposed methodology outperformed the methods in the literature in terms of overall accuracy or single channel accuracy. It is expected to provide a great benefit for physicians, especially neurologists; by providing them with a new powerful tool to support the clinical diagnosis of sleep-related diseases.


Introduction
Sleep disorders are common among the world population, leading to serious health problems that affect the quality of life.Insomnia, parasomnias, sleep-related breathing and movement disorders, hypersomnias, narcolepsy, and circadian rhythm disorders are some of the sleeprelated diseases [1].In order to detect and classify the sleep stages, several techniques can be used such as Polysomnogram (PSG) which is a set of multivariate signals recorded from subjects under study and collected during an entire night of sleep.The PSG consists of different signal recordings such as the electrocardiogram (ECG), electrooculogram (EOG), electroencephalogram (EEG), and electromyogram (EMG) [2].
Using these PSG signals, sleep can be classified into different stages: wake (W), three nonrapid eye movement (NREM) stages (N1-N3), and rapid eye movement (REM).The process is usually done manually by sleep experts who classify sleep stages by visually inspecting and evaluating the PSG signals for a specific time frame called epochs, then determining the class based on different criteria.The classification is based on a guideline developed by the American Academy of Sleep Medicine (AASM) [3].
Sleep stages or scores generally consist of two major types, REM sleep and NREM sleep (Consisting of three different stages).Each stage affects specific brain waves besides neural activity.During sleep, the person makes several cycles among all stages of NREM and REM sleep during the night, with increasingly longer, deeper REM periods occurring toward morning.The following paragraphs describe the sleep stages [4]: The EEG signal describes the brain's electrical activity.The nature of this signal is non-linear and nonstationary, so it is challenging to deal with it and get information about brain state directly in the time domain.The EEG signals are recorded from electrodes placed on the scalp with amplitude of about 10 μV to 100 μV and a frequency in the range of 1 Hz to about 100 Hz [9].In this study, the standard ear loop reference electrode (A1 and A2) has been used with the following midline channels: Central channels (C1 and C2), Occipital channels (O1 and O2), and Frontal channels (F3 and F4); which are the standard channels used by the AASM to record sleep-related EEG signals [10].
The visual inspection and manual evaluation of the PSG signals are time-consuming, complex and costly processes requiring expert technicians.On the other hand, EEG is the most robust signal used for sleep stage classification, yet, it is very hard to visually detect sleep stages by only inspecting variations because of their random appearance and chaotic nature [11].In order to successfully classify the sleep stages using EEG signals and to objectively make the proper diagnosis and decision, automated detection and classification systems must be developed to help neurologists and sleep experts in such complex tasks.In addition, advanced signal processing techniques and artificial intelligence algorithms must be applied to make sleep stage classification simpler and more robust [4].The goals of this study are to build and validate a new fast and accurate sleep stage classification methodology by designing a new convolutional neural network (CNN) model; in addition to find the best EEG channel(s) that can be used to classify sleep stages efficiently.

Literature review
In recent years, researchers have paid attention to sleep stage classification using different signals, especially EEG signals.Many approaches have been proposed for EEG pre-processing including dividing signals into epochs and classification of the epochs.These studies have developed different methods to classify sleep stages using EEG signals accurately.The following literature review is categorized based on the used methodology: machine learning, Long-Short Term Memory (LSTM), 1D-CNN, and finally 2D-CNN models.

A. Machine learning-based methods
Khalighi et al. [2] proposed an automatic methodology for two scenarios of sleep stage classification.The first scenario was to classify into sleep or awake, then classify sleep into N1, N2, N3, and REM.The second scenario was to directly classify EEG into multiclass stages (N1, N2, N3, REM, and awake).They used a combination of time, frequency, and time-frequency features that were extracted using the maximum overlap wavelet transform (MODWT) and shiftinvariant transform.Then the extracted features were fed into two-step features selection to select the discriminative features, which are classified using support vector machines (SVMs).The authors reported that the best performance achieved for the first scenario was using 6 channels with an accuracy of 94.58%, while for the second scenario was using 9 channels with an accuracy of 92.04%.On the other hand, a decision tree using a multiclass SVM for multiclass sleep stage classification was proposed by Lajnef et al. [7].The method was based on obtaining a decision tree using the hierarchical clustering technique, the tree was fed with several extracted time domain and frequency domain features.Their proposed classifier has been evaluated using k-fold cross-validation, which resulted in an overall accuracy of 92%.
Gupta et al. [12] proposed a time-frequency representation (TFR) method depending on the Fourier-Bessel decomposition method (FBDM) to decompose the non-stationary signal into a finite number of Fourier-Bessel intrinsic bands functions (FBIBFs).To get a fixed number of FBIBFs, they have suggested a zero-phase filter-bank-based (FBDM).The created FBDM was utilized to classify six distinct sleep stages using the CNN classifier to classify TFR images.Their proposed model achieved an accuracy of 91.90%.Grieger et.al. [13], on the other hand, proposed a classification system in mice that evaluated the classical sleep stages of Wake, REM, NREM and pre-REM sleep stages using a simple neural network design.The performance obtained 0.95 F1 score if the network was restricted with an out-of-sample; while in case of unrestricted networks, they obtained a performance of 0.5 F1 score.
Using a machine learning-based system to classify sleep stages, Satapathy et.al. [14] extracted 12 statistical features from each signal, then three different combinations of these features have been used.The ISRUC-Sleep database features were tested with two categories (sleep disorder and healthy), and fed to three different classifiers including Decision Tree (DT), K-Nearest Neighbor (KNN), and Random Forest (RF).The results showed that all classifiers achieved an accuracy higher than 90%, while the RF had the highest accuracy of 96.7%.In addition, Surantha et.al. [15] reported the use of the Heart Rate Variability (HRV) feature, which was calculated from ECG signals.They used a combination of extreme learning machine (ELM) and particle swarm optimization (PSO) for features reduction and selecting the best-hidden nodes numbers.The results showed accuracies ranging between 62.66% and 82.1% for different number of classes.

B. LSTM-Based methods
Ghimatgar et al. [16] combined deep learning and hidden Markov models (HMM) using multichannel EEG to improve the accuracy of sleep stage classification for neonates.The features were extracted from 30-second EEG segments and were reduced using Modified Graph Clustering Ant Colony Optimization (MGCACO) algorithm.They utilized a bi-directional LSTM (BiLSTM) network as a sleep stage classifier where the number of channels was optimized using a sequential forward selection algorithm.The authors used HMM as a post-processing technique to reduce the number of false positives.The model has been validated using two methods: the leave-one-out cross-validation technique, resulting in an overall accuracy of 82.4%, and k-fold cross-validation with an overall accuracy of 78.9%.Choi et al. [17] achieved an accuracy of 73.9% with a PSG-based system for sleep stage classification using Polyvinylidene Fluoride Film Sensor (PVDF).The PVDF sensor was used for long-term, unconstrained, and stable physiological signal recording and monitoring.Then the LSTM model was used to classify the recorded signal into four sleep stages; the LSTM consisted of three layers: two BiLSTM and one fully connected layer.However, when Ziliang et al. [18] used LSTM and a 30-second-time point time-frequency spectrum as input, the accuracy was 87.4%.Moreover, Michielli et al. [5] proposed another deep learning methodology using a cascaded LSTM recurrent neural network (RNN) for sleep stage classification where a single-channel EEG signal features was used as an input for the cascaded model.Their results showed that the LSTM-RNN cascade model scored an accuracy of 90.8% and 83.6% for LSTM and RNN, respectively.

C. 1D CNN-Based methods
Satapathy et al. [19] achieved 97.22% accuracy using deep learning methods to detect multiple sleep diseases using three different types of signals as inputs.While Zhu et al. [20] achieved 93.7% with an attention-based CNN model that used the PSG signal as input, Loh et al. [21] proposed a 1D-CNN based on a deep learning model to classify sleep stages.The model was proposed for cyclic alternating pattern (CAP) detection and homogenous 3-class sleep stage classification (W, REM, and NREM sleep) using EEG recordings.The result for the 3-class sleep stage classification of the proposed CNN network achieved an accuracy of 90.46%, however, it showed a poor accuracy of 73.64% and 52.99% using balanced and unbalanced CAP datasets, respectively.As well, Yildirim et.al. [22] proposed a 1-D CNN model using EEG and EOG signals where the accuracy ranged between 91% and 98% depending on the number of classes.

D. 2D CNN-Based methods
A joint classification and prediction CNN framework has been proposed by Phan et al. [23] for sleep stage classification.The framework was based on a simple, efficient, and powerful multitask CNN model that was used for automated sleep stage classification using single epoch signals as input.The framework used ensemble features extracted from three signals (EMG, EEG, and EOG), then these features were converted to a time-frequency image that was used as input to the CNN.The framework has been tested using two publicly available datasets; the first one was sleep-EDF which achieved an accuracy of 82.3%, and the Montreal Archive of Sleep Studies (MASS) with an accuracy of 83.6%.
Jadhav et al. [6] proposed automated classification of sleep stages using deep learning methods.They used single-channel EEG to generate a time-frequency spectrum of EEG signals; they used continuous wavelet transform (CWT) to extract the RBG image, which was fed to the pre-trained Squeezenet CNN model.The authors achieved an accuracy of 83.34%, 83.61%, and 83.17% for 30-second epoch for Morse, Bump, and Amor CWT, respectively.Moreover, Moradi et al. [8] used transferee learning for sleep stage classification using pre-trained CNN models using the Sleep Heart Health Study (SHHS) PSG dataset.The authors used two signals as input to Wanger-Ville Distribution (WVD) to convert it into 2D input (image) for the Alex-Net CNN model.The two signals were ECG and Photoplethysmography (PPG).The proposed method achieved an accuracy of 95.25% using ECG and 94.63% using PPG.
Cui et al. [24] proposed CNN using fine-grained signal segments for sleep stage classification.The methodology was based on fine segmentation with a length of 30 seconds of 11 signals that were reshaped as a time series together as input for 8-layer CNN model.The model has been successfully applied on the ISRUC-Sleep public dataset and can classify 5 classes of sleep stages with accuracies of 90%, 86%, 93%, 97%, and 90% for stage W, stage N1, stage N2, stage N3, and stage REM, respectively.
Yuan et al. [25] proposed an end-to-end hybrid deep learning network using a self-attentive method for multivariate sleep stage classification.This model detected correlation over time and extracted deep features from heterogeneous biomedical signals fed to it.The authors used a channel-wise attention-based model to integrate information from multi-views to enhance the extracted deep features.The method was tested using the UCD PSG dataset, provided by St. Vincents University Hospital and University College Dublin, and achieved an accuracy of 73.28%.
Eldele et al. [26] proposed automated classification of sleep stages using attention-based deep learning architecture called AttnSleep.This method used single-channel EEG signals to extract features by two modules: the first module was based on a multi-resolution convolutional neural network (MRCNN), which extracts low and high-frequency features.The second model was adaptive feature recalibration model (AFR) to improve the quality of the extracted features.These modules used a temporal context encoder (TCE).This technique impacts multi-head attention to ensure the capture of the temporal dependencies among the extracted features.The results indicated the stability of the method with an accuracy above 84%.Table 1 below shows a summary of the reviewed literature.

Materials and methods
The proposed methodology for sleep stages classification is illustrated in the block diagram shown in Fig 1.

Participants
The ISRUC-Sleep dataset recorded at the Sleep Medicine Centre of the Hospital of Coimbra University, Portugal, in the period between 2009 and 2013 has been utilized [10].This dataset is one of the largest publicly available datasets such that it can be used to make a comprehensive study about the sleep stage classification using different EEG channels.The data used in this study contained 100 records of all PSG signals from 100 different subjects (45 female and 55 male) with different conditions, either healthy or patients with sleep disorders.All subject's data were recorded using one data acquisition device per session [10].In this dataset, each subject's record was labeled based on visual inspection of two sleep experts based on the AASM standard [13,17].

EEG signals preprocessing
Because EEG signals from the ISRUC-SLEEP Dataset were characterized with a low signal-tonoise ratio (SNR), the preprocessing phase was applied to enhance the quality of the signals; for example, recorded signals of EEG channels were filtered to remove noise and undesired background noise and artifacts [10].In this study, the filtering phase consisted of two main stages: (1) a notch filter to eliminate the 50 Hz powerline interference; (2) a 2 nd order bandpass Butterworth filter with a lower cutoff frequency of 0.3 Hz and a higher cutoff frequency of 30 Hz [4,10].

Continuous Wavelet Transform (CWT)
The EEG signals are composed of different frequency bands, and it is hard to determine them only using frequency analysis (Fourier Transform).Usually, in EEG signal classification problems, the main aim is to localize the time at which each frequency occurs.So, the EEG signals have been transformed into the time-frequency domain to represent each frequency occurrence time [27,28].CWT is the most commonly used and powerful time-frequency analysis tool in which a certain family of wavelet functions used to decompose a signal in the time-frequency domain instead of a sinusoidal signal like Short Time Fourier Transform (STFT) [29,30].In contrary to STFT, The CWT doesn't use a fixed resolution over all windows.The time resolution and frequency resolution in the high and low frequencies can be altered by adjusting the scale and translation parameters [31,32].Moreover, given a signal x(t), the CWT can be defined as [31,32]: Where a is a scale parameter, b is a translation parameter, and φ(t) is the mother wavelet function known as the mother wavelet.
The scale can be converted to frequency by [31,32]: Where F c is the center frequency of the mother wavelet, F s is the sampling frequency of signal x(t), and a is a scale parameter.2 shows the details about layers in the proposed CNN model architecture.
Using Fig 4 and Table 2, it is worth noting that the proposed model has 4 blocks for extracting very deep features from epochs CWT.These blocks form the core of the model to extract both deep and general features and obtain the most discriminative ones.The uniqueness of the proposed model lies in the combination of the deep features extracted from the four consequent convolution layers separated by Rectified Linear Unit (ReLU) and the batch normalization layer.General features were extracted using the x-box technique which allows using both general and minor changes in the CWT images.Furthermore, the proposed model will improve the flow of information and gradients through the network, making the optimization of very deep networks tractable.Other advantages of the model include strong features propagation, feature reuse and combination, and substantial reduction in the number of parameters.The network weights and biases were initialized using "glorot" weight initialization, where a small gaussian value with a zero mean is initially assigned to each weight.Finally, the network will be trained end-to-end.
The confusion matrix has been used in order to test the effectiveness of the proposed model by comparing the device output to the reference labels or data [33,34].Common metrics of model performance (i.e.such as accuracy, specificities, sensitivity, and precision as well as F1-Score can be extracted from the confusion matrix [35][36][37].

Results
The epochs of all EEG channels from patients were stacked together resulted in a total of 87,001 epochs (Table 3 shows the total number of samples per class), while the labels were    4 shows the overall evaluation metrics of testing performance among different EEG channels.
To comprehensively compare all used channels in the results, the performance among all channels must be calculated and shown for every class.This can be used to determine the best  channel for each class because sometimes the overall accuracy of the channel can be affected by some of the classes' low performance and vice versa.Table 5 shows the detailed performance metrics for each class among all channels using the proposed methodology.Finally, to check and evaluate the robustness of the model performance, it has been evaluated using 10-fold cross-validation, where 10-fold cross-validation is more robust than training-validation-testing methods especially in large datasets.Table 6 shows the 10-fold performance evaluation metrics among different EEG channels, while Table 7 shows the performance of all classes among each channel.
Strikingly, the results obtained through 10-fold cross-validation closely mirrored those achieved when testing the model on an independent testing set.This convergence underscores the reliability and generalizability of our model, as it consistently demonstrated consistent performance across diverse data subsets.The similarity between cross-validation and testing set results suggests that the model has effectively learned the underlying patterns in the data and can make accurate predictions on unseen instances.This alignment between the two evaluation approaches instills confidence in the model's reliability and its potential to perform well in real-world scenarios beyond the training data.

Discussion
The principal objective of this study was to develop a methodology that can classify pattern alterations in the EEG signal due to sleep stages in order to detect at which stage the patient is.This goal has been achieved by creating a deep learning model using CNN that automatically learns how to extract and use the deep features of EEG signal CWT image and discriminate between sleep sages accordingly.After making a comparison between channels' overall performance in the used methodology, it has been noticed that the best channel among all used channels was the C4-A1 channel; the channel scored performance metrics values of 99.39%, 99.34%, 99.84%, 99.38%, 99.36%, and 0.994 for accuracy, sensitivity, specificity, precision, F1-Score, and Area Under Curve (AUC), respectively.These values can confirm that sleep stage classification can be done using only one EEG channel.The second channel in order in terms of performance was the F4-A1 channel; the channel scored performance metrics values of 99.35%, 99.29%, 99.82%, 99.36%, 99.33%, and 0.996 for accuracy, sensitivity, specificity, precision, F1-Score, and AUC, respectively.
Comparing these two channels together, it can be found that their performances were comparable, and had a small yet significant difference from the third channel in order (C3-A2).However, all other channels scored more than 98.50% in all metrics, which indicated that they were robust as well.
Results in Table 4 showed the best channel that produced the highest accuracy and sensitivity in each class.For class N1, for example, it can be noticed that the best channel for accurately detecting this stage was the F4-A1 channel, with a value of 99.40% for accuracy and 99.40% for sensitivity.For the N2 sleep stage, the best channel was the C4-A1 channel with a value of 99.54% for accuracy and 99.54% for sensitivity.For the N3 sleep stage, the best channel was also the C4-A1 channel with a value of 99.58% for accuracy and 99.58% for sensitivity.For the R sleep stage, the best channel was the C4-A1 channel with a value of 99.00% for accuracy and 90.00% for sensitivity.Finally, for the W stage, the best channel was the F4-A1 channel with a value of 99.36% for accuracy and 99.36% for sensitivity.
Using these results, it has been shown that the C4-A1 channel beat the F4-A1 channel in 3 classes out of 5 classes in terms of performance, making it more suitable for the main classification channel.As a final statement for all shown and discussed results above, it has been noticed that the best EEG channel that can be used as a single input for the CNN model was the C4-A1 channel, either using overall performance or using a single class performance.
The proposed methodology has proved its ability to accurately classify the sleep stages using only one EEG channel by calculating the CWT of each epoch and feeding it to the CNN model.The proposed CNN model is light (19 layers), reflecting its classification speed.Moreover, the proposed methodology has outperformed the methods in literature including those used 1D or 2D CNN models.Table 5 compares the proposed approach to the models and methods that have the highest performance in literature.
For instance, the work proposed by Gupta and Pachori [12] used CWT with Morse, Bump, and Amor mother wavelets images of epochs with transfer learning of pre-trained CNN model  [14] focused on using pretrained models which are usually not very efficient in EEG sleep stage classification, they also used Wanger-Ville Distribution, which is time-consuming compared to CWT.
On the other hand, Zhu et al. [20] proposed a 1D CNN model composed of 34 layers compared to 19 layers in the current study.Their model used a combination of two EEG channels as input instead of one as in the proposed model.Finally, they used a very small dataset size from only 10 subjects with a total of 12,000 epochs for each channel, which is very small compared to the dataset used in this work that consisted of 100 subjects with a total of 87,001 epochs per channel.Based on that, their model's performance could vary if they trained it using a larger heterogeneous dataset.
Based on the aforementioned discussion, the model has many merits including: (i) Computational Efficiency, where the 19-layer CNN architecture is designed to be more computationally efficient compared to similar pretrained networks like Densnet (201 layers), ResNet (101 layers), and GoogleNet (144 layers).(ii) Training Speed, with fewer layers, the model will converge faster during the training process.(iii) Resource Efficiency, where the reduced model complexity translates to lower memory requirements during both training and inference, making it more resource-efficient, especially in environments with limited computing resources.(iv) Simpler Architecture, where the 19-layer architecture simplifies the model structure, potentially making it easier to interpret and understand.This simplicity can be advantageous for model debugging, optimization, and maintenance.(v) Reduced Overfitting Risk, because a simpler model is less prone to overfitting, especially when dealing with limited amounts of data.This can contribute to better generalization performance on unseen data.
On the other hand, the proposed model suffers from some limitations such as it may have a limited capacity to capture intricate patterns and representations in complex datasets, its complex architecture may limit the model's ability to automatically learn hierarchical and abstract features from raw input data, especially when dealing with datasets that have nuanced patterns, in addition, it may have challenges with transfer learning, because the use of pretrained networks for transfer learning might be less straightforward with a significantly different architecture.However, it is very important to note that the mentioned advantages and disadvantages are context-dependent, and the suitability of the 19-layer CNN architecture depends on the specific requirements and constraints of the EEG classification task at hand.
Moving forward, efforts to enhance the interpretability of the deep learning model and address uncertainties in single-channel classification could focus on key areas.Incorporating interpretable deep learning techniques, such as layer-wise relevance propagation and attention mechanisms will offer insights into influential features within the EEG signal [38][39][40].Developing specific metrics for model explainability and employing visualizations such as heatmaps can provide tangible representations of the model's decision-making process, aiding clinician understanding and trust.Additionally, uncertainty estimation techniques, ensemble models, and robustness analysis can be explored to quantify confidence, improve reliability, and assess the model's generalization to variations [41].
In parallel, tailored methods for explaining decisions with single-channel inputs, interactive interfaces for clinician collaboration, and feedback mechanisms for continuous improvement can further refine the diagnostic process.Integration with existing sleep studies or complementary modalities, such as polysomnography, presents an avenue for a more comprehensive understanding of sleep patterns [39,41].These future directions collectively aim to advance the explainability and reliability of the deep learning model in the context of EEG-based sleep stage classification [38,40].
Finally, as a summary of comparing the proposed methodology with surveyed literature, the proposed methodology has outperformed most previous works either in terms of dataset size or in terms of the performance of the classifier.Moreover, the proposed CNN model is lighter than all models in literature so that it is feasible to be used as a time sleep stages classifier.Table 8 shows a comparison in terms of accuracy between literature and proposed method.

Conclusions
In conclusion, a new methodology for sleep stage classification using EEG channels has been proposed focusing on high accuracy.The proposed system developed a new algorithm for detecting and classifying sleep stages by providing a new light CNN model for classification purposes.The proposed methodology can produce a precise and accurate sleep stage classification by converting each 30-second epoch into images using CWT.In addition, the effectiveness of the proposed system was evaluated using different performance evaluation metrics, which showed that the proposed methodology was robust and highly accurate.Finally, the best channel that can be used as input to the methodology was C4-A1 followed by F4-A1.The proposed system may be used with patients suffering from stroke.Other applications may include the study of sleep quality or monitoring brain signals during sleeping time.
Fig 2 shows the block diagram of the preprocessing techniques.

Fig 4 .
Fig 4. The proposed 19 layers CNN model.https://doi.org/10.1371/journal.pone.0297582.g004 scored based on the PSG technicians' reports.The CWT images dataset for each EEG channel epoch was then generated and saved to its corresponding label folder.The bump wavelet has been used to detect the narrower variance in frequency with sampling frequency (Fs) equal to 200.Each folder of EEG channel epochs CWT images was divided into three sub-datasets, namely, training, validation, and testing with the following ratios 70%, 15%, and 15%, respectively.The model trained using Adam optimizer with an initial learning rate of 0.001, minibatch size of 128, max epochs of 100, validation frequency of 100, and using parallel processing technique.For each channel, the training and validation accuracy and loss curves were evaluated, in addition to the testing confusion matrix.All CWT images generated from EEG channels epochs have been fed to the proposed CNN model architecture.Then, an independent test dataset was used in order to evaluate the performance of CNN model architecture in classifying the sleep stages.The testing dataset results using confusion matrix are shown inFig 5. Table

Table 7 . 10-fold cross-validation performance metrics for each class among all used EEG channels.
[24]the authors did not propose any new model to classify CWT images.Moreover, they used a small dataset (42 subjects and 61 PSG) compared to the number used in the current study.Finally, their best overall accuracy was 83.61% using 30-second epochs with Bump mother wavelet and ignoring the results of 150-second epochs because AASM standards recommend using the epoch's length of only 30 seconds for sleep stage classification.When comparing the proposed methodology with the closest 2D CNN model performance proposed by Cui et al.[24], their model performance was low because it combined signals to generate 2D images.Such technique was not efficient because time-frequency analysis or representation was used to enhance the difference among different epochs of different sleep stages.The proposed model outperformed that model since the CWT multiresolution timefrequency analysis has been used to make the CNN model capable of extracting very deep features.While the work by Satapathy et al.